package leetcode.string;

import leetcode.string.common.StringUtils;

class Solution1813 {
    /**
     * 一个句子是由一些单词与它们之间的单个空格组成，且句子的开头和结尾没有多余空格。
     *
     * @param sentence1
     * @param sentence2
     * @return
     */
    public boolean areSentencesSimilar(String sentence1, String sentence2) {
        return StringUtils.areSentencesSimilar(sentence1, sentence2);
    }
}

public class leetcode1813 {
    public static void main(String[] args) {
        Solution1813 solution1813 = new Solution1813();
        System.out.println(solution1813.areSentencesSimilar("My name is Haley", "My Haley")); // true
        System.out.println(solution1813.areSentencesSimilar("of", "A lot of words")); // false
        System.out.println(solution1813.areSentencesSimilar("Eating right now", "Eating")); // true
        System.out.println(solution1813.areSentencesSimilar("Luky", "Lucccky")); // false
        System.out.println(solution1813.areSentencesSimilar("c h p Ny", "c BDQ r h p Ny")); // true
        System.out.println(solution1813.areSentencesSimilar("a", "a aa a")); // true
        System.out.println(solution1813.areSentencesSimilar("b b", "b")); // true
        System.out.println(solution1813.areSentencesSimilar("aa", "a Aa")); // false
        System.out.println(solution1813.areSentencesSimilar("C", "CB B C")); // true
        System.out.println(solution1813.areSentencesSimilar("B", "ByI BMyQIqce b bARkkMaABi vlR RLHhqjNzCN oXvyK zRXR q ff B yHS OD KkvJA P JdWksnH")); // false
    }
}
